package com.hisense.hiioc.formtable.mapper;

import com.hisense.hiioc.formtable.domain.Form;
import com.hisense.hiioc.formtable.domain.FormAndRows;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Component;

import java.util.List;
import java.util.Map;

@Mapper
@Component
public interface FormMapper extends CommonMapper<Form>  {

    void alertForm(Form form);
    @Override
    int insert(Form obj);

    @Override
    int deleteById(int id) ;

    @Override
    int update(Form obj) ;

    @Override
    Form queryOne(int id) ;

    @Override
    List<Form> queryAll() ;

    /**
     * 查询表单列表的时候加上数据条数、字段个数、是否建表等字段
     * @return
     */
    List<FormAndRows> queryFormAndRows(Map<String, Object> map);

    void updateFormTableName(Form obj);

    int countByFormName(@Param("formName") String formName);

}
